
const useSettingsStore = defineStore(
  'settings',
  {
    state: () => ({
      title: '',
    }),
    actions: {
      // 修改布局设置
      changeSetting(data) {
        const { key, value } = data
        if (this.hasOwnProperty(key)) {
          this[key] = value
        }
      },
      // 设置网页标题
      setTitle(title) {
        this.title = title
        document.title = title;
      }
    }
  })

export default useSettingsStore
